package com.yiyuan.weixin.weixinOutservice.dao;

import com.yiyuan.weixin.Common.GlobalConstant;
import com.yiyuan.weixin.utils.HttpUtil;
import com.yiyuan.weixin.weixinOutservice.service.AbsWeiXinService;

/**
 * Created by admin on 2017/3/27.
 */
public class MenuServiceDao implements MenuService{

    /**********
     * 创建菜单
     * @param json  菜单json
     * @return
     */

    public String createMenu(String json){
        System.out.println(json);
        return HttpUtil.sendPostUrl(GlobalConstant.create_menu+GlobalConstant.ACCESS_TOKEN,json,"utf-8");
    }

    /*****
     * 删除正在使用菜单
     * @return
     */

    public String deleteMenu(){
        return HttpUtil.sendGet(GlobalConstant.delete_menu+GlobalConstant.ACCESS_TOKEN);
    }

    /********
     * 查询菜单
     * @return
     */

    public String getMenu(){
        return HttpUtil.sendGet(GlobalConstant.get_menu+GlobalConstant.ACCESS_TOKEN);
    }

}
